package com.ray.auth.system.emun;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.druid.sql.dialect.mysql.ast.MysqlForeignKey.On;

/**
 * <h1>数据库 使用状态  </h1>
 * @创建人 ray
 * @创建时间 2017-06-12
 * @版本 1.0
 * @重要修改备注 
 */ 
public enum UseStatus {
	  ON("0","启用"),
	  OFF("1","禁用");
	  /**类型**/
	  private String type;
	  /**类型名称**/
	  private String name;
	  
	  private UseStatus(String type,String name) {
		this.type = type;
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static List<Object> getDictList(){
    	List<Object> result = new ArrayList<Object>();
    	Map<String,String> map = new HashMap<String,String>();
    	map.put("name", OFF.name);
    	map.put("value", OFF.type);
    	result.add(map);
    	 map = new HashMap<String,String>();
     	map.put("name", ON.name);
     	map.put("value", ON.type);
     	result.add(map);
    	return result;
    }
}
